#include <iostream>
#include <string>

// 定义一个结构体
struct Student {
    std::string name;
    int age;
    float score;
};

// 创建结构体数组
Student students[3] = {
    {"Alice", 18, 90.5f},
    {"Bob", 19, 85.0f},
    {"Charlie", 17, 92.3f}
};

int main() {
    // 访问和修改结构体数组元素
    students[1].score = 88.5f;

    // 遍历结构体数组
    for (int i = 0; i < 3; i++) {
        std::cout << "Name: " << students[i].name
            << ", Age: " << students[i].age
            << ", Score: " << students[i].score << std::endl;
    }

    return 0;
}